package tv_megazineplus

import javax.ws.rs.GET
import javax.ws.rs.Path
import javax.ws.rs.Produces


@Path('/api/getChannelListXML')
class GetChannelListXMLResource {

    @GET
    @Produces(['application/xml'])
    List<Channel2> getGetChannelListJSONRepresentation() {
       def t1 = System.currentTimeMillis()
        def retorno = Channel2.list()
        def tt = System.currentTimeMillis() - t1        
        new Statistic(servico: Servicos.findByName('getChannelListXML'), totalTime: tt, date: new Date()).save()    
        return retorno
    }
    
    
}
